﻿var csdn = csdn || function () { };

csdn.checkUN = function (un) {
    return /^[a-z][a-z0-9_]{4,19}$/i.test(un);
};
csdn.checkEM = function (em) {
    return /^([a-z0-9][a-z0-9_\-\.]+)@([a-z0-9][a-z0-9\.\-]{0,20})\.([a-z]{2,4})$/i.test(em);
};

csdn.checkMobile = function (mob) {
    return /^1[\d]{10}$/.test(mob);
};
csdn.checkURL = function (url) {
    return /^http(s)?:\/\/([\w-:]+\.)+[\S]+$/i.test(url);
};